package win.smartown.java.io;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * Created by smartown on 2017/5/16.
 */
public class FileReader {

    public void readFile() throws IOException {
        FileInputStream fin = new FileInputStream("C:/kms8.log");
        byte[] bytes = new byte[512];
        while (fin.read(bytes) != -1) {
            System.out.println(new String(bytes, "gbk"));
        }
        fin.close();
    }

}
